<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemGroupXCoursesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_group_x_courses', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('system_groups_id')  ->default(0)  ->comment('团活动id');
            $table->bigInteger('course_id')         ->default(0)  ->comment('课程id');
            $table->decimal('group_price')                ->default(0)  ->comment('课程拼团价');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('system_group_x_courses');
    }
}
